<?php
class LogMcuList extends AppModel
{
    public $name = 'LogMcuList';
    public $primaryKey = '_id';


    public function get_mcu_list($_db_name)
    {
        $this->useDbConfig = $_db_name['log'];

        $params = array(
            'order' => array('created' => 'ASC')
        );

        $data = $this->find('all', $params);
        return $data;
    }

    public function delect_all($_db_name)
    {
        $this->useDbConfig = $_db_name['log'];
        $this->deleteAll(array('_id not' => null));
        return true;
    }

}